home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_300 / 361_01 / getldate.c < prev    next >
C/C++ Source or Header  |  1991-09-18  |  428b  |  22 lines

  1.  
  2. /* GetLongDate --> Taken from CUG-273 */
  3.  
  4. #include <stdek.h>
  5. #include <gadgets.h>
  6. #include <dos.h>
  7. #include <stdio.h>
  8. #include <stdlib.h>
  9.  
  10. long int GetLongDate(void)
  11. /* Return: The current date in the format YYMMDD. */
  12. {
  13.     struct date today;
  14.     char Text[40];
  15.  
  16.     getdate(&today);
  17.     sprintf(Text, "%2.2d%2.2d%2.2d", today.da_year - 1900,
  18.        today.da_mon, today.da_day);
  19.     return atol(Text);
  20. }
  21.  
  22.